a, button {
  transition: color .3s ease;
}

input[type=checkbox], a, button {
  cursor: pointer;
}

button {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	font-size: 100%;
	vertical-align: baseline;
	font-family: inherit;
	font-weight: inherit;
	color: inherit;
	-webkit-appearance: none;
	appearance: none;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body {
	font-family: 'Noto Sans HK', sans-serif;
  font-size: 12px;
	line-height: 1.4em;
	background: #d5d7de;
	color: #000;
	min-width: 230px;
	max-width: 550px;
	margin: 0 auto;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	font-weight: 300;
}

:focus {
	outline: 0;
}

.hidden {
	display: none;
}

.header {
  &:before {
    content: '';
    display: block;
    position: absolute;
    top: 13px;
    left: 13px;
    width: 65px;
    height: 65px;
    z-index: 1;
    opacity: 1;
    background-image: url("");
    background-repeat: no-repeat;
    background-position: center;
  }
}

.todoapp {
	width: 100%;
	background: #fff;
  padding: 13px;
	// margin: 130px 0 40px 0;
	position: relative;
  border-radius: 10px;
	box-shadow: 0 0 13px rgba(0, 0, 0, 0.2)
}

.todoapp input::-webkit-input-placeholder {
	font-weight: 400;
	color: #ddd;
}

.todoapp input::-moz-placeholder {
	font-weight: 400;
	color: #ddd;
}

.todoapp input::input-placeholder {
	font-weight: 400;
	color: #ddd;
}

.new-todo,
.edit {
	position: relative;
	margin: 0;
	width: 100%;
	font-size: 24px;
  font-weight: bold;
	font-family: inherit;
	font-weight: inherit;
	line-height: 1.4em;
	border: 0;
	color: inherit;
	box-sizing: border-box;
}

.new-todo {
	padding: 16px 60px 16px 60px;
  border-radius: 10px;
  border: none;
  background: #efefef;
  transition: background .3s ease;
  &:focus {
    background: #ddd;
  }
}

.new-todo-button {
  position: absolute;
  display: inline-block;
  width: 65px;
  height: 65px;
  right: 13px;
  top: 13px;
  transition: opacity .3s ease;
  background-image: url("");
  background-repeat: no-repeat;
  background-position: center;
}

.main {
	position: relative;
	z-index: 2;
}

.completed-wrapper {
  border-bottom: 1px solid #e6e6e6;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toggle-all {
	width: 1px;
	height: 1px;
	border: none; /* Mobile Safari */
	opacity: 0;
	position: absolute;
	right: 100%;
	bottom: 100%;
}

.toggle-all + label {
	font-size: 12px;
	top: 13px;
	left: 13px;
  z-index: 99;
  cursor: pointer;
  color: #999;
  transition: color .3s ease;
  &:hover {
    color: #000;
  }
}

.toggle-all + label:before {
  background-image: url("");
  background-repeat: no-repeat;
  background-position: center;
  content: '';
	font-size: 22px;
	opacity: .2;
  width: 57px;
  height: 40px;
  display: inline-block;
  vertical-align: middle;
}

.toggle-all:checked + label:before {
	opacity: 1;
}

.todo-list {
	margin: 13px 0;
	padding: 0;
	list-style: none;
}

.todo-list li {
	position: relative;
	font-size: 24px;
  border-radius: 10px;
  transition: background .3s ease;
  &:hover {
    background: #f8f8f8;
  }
}

.todo-list li:last-child {
	border-bottom: none;
}

.todo-list li.editing {
	border-bottom: none;
	padding: 0;
  background: #fff;
}

.todo-list li.editing .edit {
	display: block;
	width: calc(100% - 43px);
	padding: 12px 16px;
	margin: 0 0 0 43px;
}

.todo-list li.editing .view {
	display: none;
}

.todo-list li .toggle {
	text-align: center;
	width: 40px;
	/* auto, since non-WebKit browsers doesn't support input styling */
	height: auto;
	position: absolute;
	top: 0;
	bottom: 0;
	margin: auto 0;
	border: none; /* Mobile Safari */
	-webkit-appearance: none;
	appearance: none;
}

.todo-list li .toggle {
	opacity: 0;
}

.todo-list li .toggle + label {
	background-image: url("");
	background-repeat: no-repeat;
	background-position: 15px center;
}

.todo-list li .toggle:checked + label {
	background-image: url("");
}

.todo-list li label {
	word-break: break-all;
	padding: 15px 15px 15px 60px;
	display: block;
	line-height: 1.2;
	transition: color 0.4s;
}

.todo-list li.completed label {
	text-decoration: line-through;
}

.todo-list li .destroy {
	display: none;
	position: absolute;
	top: 0;
	right: 10px;
	bottom: 0;
	width: 40px;
	height: 40px;
	margin: auto 0;
	font-size: 30px;
	color: #cc9a9a;
	margin-bottom: 11px;
	transition: color 0.2s ease-out;
}

.todo-list li .destroy:hover {
	color: #af5b5e;
}

.todo-list li .destroy:after {
	content: '';
  width: 40px;
  height: 40px;
  display: inline-block;
  background-image: url("");
	background-repeat: no-repeat;
	background-position: center;
}

.todo-list li:hover .destroy {
	display: block;
}

.todo-list li .edit {
	display: none;
}

.footer {
	color: #999;
	padding: 10px 0 0 17px;
	border-top: 1px solid #e6e6e6;
  display: flex;
  justify-content: space-between;
}

.todo-count {
	text-align: left;
}

.todo-count strong {
	font-weight: bold;
  color: #555;
}

.filters {
	margin: 0;
	padding: 0;
	list-style: none;
	right: 0;
	left: 0;
  li {
    display: inline-block;
    padding: 0 3px;
    a {
      color: inherit;
      text-decoration: none;
      &:hover, &.selected {
        color: #000;
      }
    }
  }
}

.clear-completed {
  display: inline-block;
  line-height: 40px;
  color: #999;
}

.clear-completed,
html .clear-completed:active {
	text-decoration: none;
	cursor: pointer;
}

.clear-completed:hover {
	color: #000;
}
